package com.cooldatasoft.taskManager.component;

import org.vaadin.teemu.wizards.WizardStep;

import com.vaadin.terminal.ThemeResource;
import com.vaadin.ui.Component;
import com.vaadin.ui.Embedded;
import com.vaadin.ui.VerticalLayout;

public class CustomWizardStep implements WizardStep {

	private String myCaption;
	private String myImage;
	
	public CustomWizardStep(String caption, String image) {
		myCaption = caption;
		myImage = image;
	}
	
	@Override
	public String getCaption() {
		return myCaption;
	}

	@Override
	public Component getContent() {
		 VerticalLayout content = new VerticalLayout();

		 Embedded image = getImage();
		 image.setSizeFull();
	        content.addComponent(image);

	        return content;
	}

	@Override
	public boolean onAdvance() {
		// TODO Auto-generated method stub
		return true;
	}

	@Override
	public boolean onBack() {
		// TODO Auto-generated method stub
		return true;
	}
	
    private Embedded getImage() {
        Embedded image = new Embedded("", new ThemeResource(
                myImage));
        return image;
    }

}
